﻿<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
	<div th:replace="include/_meta :: div"></div>
	<title>ZK节点查看</title>
	<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"/>
	<link rel="stylesheet" th:href="@{/zTree/css/demo.css}" type="text/css"/>
</head>
<body style="height: 1500px;">
<h1 style="margin-top: 20px;">
	ZK 集群数据查看
</h1>

<div class="row">
	<div style="text-align: right;margin-left:-19%;" class="col-md-12">
		<button onclick="window.location = ctx+'/toManager'" class="btn btn-success">管理</button>
	</div>
</div>

<div class="container" style="margin-top: 20px;">

	<div class="row well well-sm" th:each="item : ${list}">
		<div class="col-md-2" th:text="${item.clusterName}"></div>
		<div class="col-md-9">
			<button class="btn btn-sm btn-default" disabled="disabled" th:each="info : ${item.serverInfoList}"
					th:text="|${info.ip}:${info.port}|">
			</button>
		</div>
		<div class="col-md-1">
			<button class="btn btn-success" data="flag" th:onclick="'getTreeNode(\'' + ${item.clusterId} + '\',this);'">连接</button>
		</div>
	</div>

	<!--<div class="row" style="text-align: right">
		<button onclick="clearConn();" class="btn btn-success">清空连接</button>
		<button onclick="delAllNode();" style="display: none" class="btn btn-success" id="delAllNode">删除所有节点</button>
	</div>-->

</div>
<script type="text/javascript" th:inline="javascript">
	function getTreeNode(clusterId){
		window.location = ctx + "/getNodes?clusterId="+clusterId;
	}
</script>
</body>
</html>

























